<script setup lang='ts'>
import ReceiveReport from '@/views/process/components/ReceiveReport.vue'

const fileList = ref([
  {
    name: 'xxxxxxxxx报告.pdf',
    url: 'https://element-plus.org/images/element-plus-logo.svg',
  },
  {
    name: 'xxxxxx报告.pdf',
    url: 'https://element-plus.org/images/element-plus-logo.svg',
  },
  {
    name: 'xxxxxx报告.pdf',
    url: 'https://element-plus.org/images/element-plus-logo.svg',
  },
  {
    name: '风险报告.pdf',
    url: 'https://element-plus.org/images/element-plus-logo.svg',
  },
])
const fileList1 = ref([
  {
    name: 'xxxxxxxxx 交维报告.pdf',
    url: 'https://element-plus.org/images/element-plus-logo.svg',
  },
])
const receiveVisible = ref(false)
</script>

<template>
  <a-collapse :default-active-key="['3']" destroy-on-hide mt3 w-full>
    <a-collapse-item key="1" header="客户验收">
      <!-- 销售填写 -->
      <div class="!w-1/2" flex-1>
        <el-form-item label="验收报告">
          <el-upload
            v-model:file-list="fileList" class="upload-demo w-full"
            action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" multiple :limit="3"
          >
            <el-button type="primary">
              上传
            </el-button>
          </el-upload>
        </el-form-item>
        <el-form-item label="验收意见">
          <el-input type="textarea" />
        </el-form-item>
        <div flex-end-center>
          <el-popconfirm title="请确认客户验收完成，可进入计费阶段！">
            <template #reference>
              <el-button type="primary" ml-4>
                提交
              </el-button>
            </template>
          </el-popconfirm>
        </div>
      </div>
    </a-collapse-item>
    <a-collapse-item key="3" header="计费日期">
      <div class="!w-1/2">
        <el-form-item label="选择日期">
          <el-date-picker type="date" placeholder="选择日期时间" class="!w-full" />
        </el-form-item>
        <el-form-item label="备注">
          <el-input type="textarea" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" mla>
            提交
          </el-button>
        </el-form-item>
      </div>
    </a-collapse-item>
    <a-collapse-item key="4" header="内部验收">
      <!-- 交付填写--运维处理 -->
      <div class="!w-1/2" flex-1>
        <el-form-item label="交维报告">
          <el-upload
            v-model:file-list="fileList1" class="upload-demo w-full"
            action="https://run.mocky.io/v3/9d059bf9-4660-45f2-925d-ce80ad6c4d15" multiple :limit="3"
          >
            <el-button type="primary">
              上传
            </el-button>
          </el-upload>
        </el-form-item>
        <el-form-item label="注意事项">
          <el-input type="textarea" />
        </el-form-item>
        <el-form-item>
          <el-button type="primary" mla>
            提交
          </el-button>
        </el-form-item>
      </div>
    </a-collapse-item>
  </a-collapse>

  <ReceiveReport v-model="receiveVisible" />
</template>

<style scoped lang='scss'>

</style>
